package org.dromara.crawler.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.Data;

import java.util.Date;

/**
 * 抓取任务实体类
 *
 * @author shup
 * @date 2025-6-18
 */

@Data
@Entity(name="crawler_task")
@TableName("crawler_task")
public class CrawlerTask extends BasicEntity {

    @Id
    @TableId(type= IdType.ASSIGN_ID)
    private Long id;

    private String taskName;

    /**
     * 多个关键字用 逗号隔开
     */
    private String keyWord;

    @JsonFormat(shape = JsonFormat.Shape.STRING, locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @JsonFormat(shape = JsonFormat.Shape.STRING, locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    /**
     * 0 未启动
     * 1 已启动
     * 2 已暂停
     */
    private String status;

}
